<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="Content-Script-Type" content="text/javascript" />
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<meta http-equiv="keywords" content="" />
		<meta http-equiv="description" content="" />
		<title>工房受注管理</title>

		<link rel="stylesheet" href="./assets/styles/default.css" type="text/css" />
		<script src="assets/scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
		<script src="assets/scripts/menu.js" type="text/javascript"></script>
		<script src="assets/scripts/table.js" type="text/javascript"></script>

		<script src="assets/scripts/ui/jquery-ui-1.7.2.custom.js" type="text/javascript"></script>
		<link type="text/css" href="./assets/styles/ui-lightness/jquery-ui-1.7.2.custom.css" rel="stylesheet" />
		<script type="text/javascript" src="./assets/scripts/ui/ui.core.js"></script>
		<script type="text/javascript">
		$(function() {
		
			// メッセージのフェード
			$('.message').fadeIn("slow");

		});
		</script>
	
		<link rel="stylesheet" type="text/css" href="./assets/styles/tablesorter.css" />

		<script type="text/javascript" src="./assets/scripts/tablesorter.js"></script>
		<script type="text/javascript">
			var sorter = new TINY.table.sorter("sorter");
				sorter.head = "head";
				sorter.asc = "asc";
				sorter.desc = "desc";
				sorter.even = "evenrow";
				sorter.odd = "oddrow";
				sorter.evensel = "evenselected";
				sorter.oddsel = "oddselected";
				sorter.paginate = true;
				sorter.currentid = "currentpage";
				sorter.limitid = "pagelimit";
			$(function(){
					sorter.init("inquiry_result",0);
			});
		</script>
		
		
	</head>
	<body id="" >
{{ php }} include( MENU_FILE ); {{ /php }}

		<div id="header" class="clearfix"><div class="wrapper">
			<h1><a href="./">コントロールパネル</a></h1>
			<form id="form_logout" action="logout.php" method="post"><p>{{ $login.staff_name }} <input type="submit" id="button_logout" value="ログアウト" /></p></form>
		</div></div>
		<div id="container"><div class="wrapper">

			<h2>工房受注管理</h2>
			<ul class="submenu clearfix">
				<li><a href="order_search.php">受注検索</a></li>								
				<li><a href="order.php">受注登録</a></li>
				<li><a href="order_shop.php">商品マスタ</a></li>
			</ul>
			
			<h3>{{if $flag!=1}}メール発送{{else}}参照{{/if}}</h3>
			{{ if $phase == 'complete' }}
			<p class="message">メール 発送完了</p>
			<ul>
				<li>&gt;&gt; <a href="orderInfo.php?order_id={{$order_id}}">一覧へ戻る</a></li>
			</ul>
			{{else}}
			<p class="message">{{if $flag!=1}}メール発送{{else}}参照{{/if}}<span style="color: red">{{$err.email}}</span></p>
			<form action="order_email.php" method="post">
			{{if $flag!=1 }}
			<input type="hidden" name="order_id" value="{{$forms.order_id}}"  />
			<table id="inquiry_result" class="formTable">
				<thead>
					<tr>
						<th>From</th>
						<td><input style="width: 200px" type="text" name="from" class="text" value="{{$forms.from}}" /> <span style="color: red">{{$err.from}}</span></td>
					</tr>
					<tr>
						<th>To</th>
						<td><input style="width: 200px" type="text" name="to"  class="text" value="{{$forms.to}}" /> <span style="color: red">{{$err.to}}</span></td>
					</tr>
					<tr>
						<th>Subject</th>
						<td><input style="width: 300px" type="text" name="subject"  class="text" value="{{$forms.subject}}" /> <span style="color: red">{{$err.subject}}</span></td>
					</tr>
					<tr>
						<th>伝票番号</th>
						<td><input style="width: 100px" type="text" name="no"  class="text" value="{{$forms.no}}" /> <span style="color: red">{{$err.no}}</span></td>
					</tr>
					<tr>
						<th>内容</th>
						<td>
						<textarea name="context" style="width: 100%;height: 200px" >{{$forms.context}}</textarea>
						 <span style="color: red">{{$err.context}}</span>
						</td> 
					</tr>					
				</thead>			
			</table>	
			<p class="button">
				<button type="submit" id="btn_search" class="submit"><span>送信</span></button>
			</p>
			{{else}}
			<table id="inquiry_result" class="formTable">
				<thead>
					<tr>
						<th>From</th>
						<td>{{$forms.from}}</td>
					</tr>
					<tr>
						<th>To</th>
						<td>{{$forms.to}}</td>
					</tr>
					<tr>
						<th>Subject</th>
						<td>{{$forms.subject}}</td>
					</tr>
					<tr>
						<th>伝票番号</th>
						<td>{{$forms.no}}</td>
					</tr>
					<tr>
						<th>内容</th>
						<td>
						{{$forms.context}}</td> 
					</tr>					
				</thead>			
			</table>
			{{/if}}
			</form>
			{{/if}}
			<br/>
			<br/>

		</div></div>
			
			
		<address>Copyright (C) SHIFT Inc. / All rights reserved</address>

	</body>
</html>